#define  _CRT_SECURE_NO_WARNINGS 1
#include<vector>
#include<iostream>


   

using namespace std;
int main() {
 
    vector<vector<int>> vv;
    for (int i = 0; i <5; i++) {

        vv[i].resize(i + 1, 1);

    }
    for (int i = 0; i < vv.size(); i++) {


        for (int j = 1; j < vv[i].size() - 1; j++) {
            vv[i][j] = vv[i - 1][j] + vv[i - 1][j - 1];
        }
    }
   
    for (int i = 0; i < vv.size(); i++) {


        for (int j = 0; j < vv[i].size(); j++) {


            cout << vv[i][j] << " ";

        }
        cout << endl;
    }








	return 0;
}